Integrand size = 26, antiderivative size = 83 \[ \int (3+3 \sin (e+f x))^m (c-c \sin (e+f x))^2 \, dx=-\frac {27\ 2^{\frac {1}{2}+m} c^2 \cos ^5(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {5}{2},\frac {1}{2}-m,\frac {7}{2},\frac {1}{2} (1-\sin (e+f x))\right ) (1+\sin (e+f x))^{\frac {1}{2}-m} (3+3 \sin (e+f x))^{-3+m}}{5 f} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.04, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2815, 2768, 72, 71} \[ \int (3+3 \sin (e+f x))^m (c-c \sin (e+f x))^2 \, dx=-\frac {a^3 c^2 2^{m+\frac {1}{2}} \cos ^5(e+f x) (\sin (e+f x)+1)^{\frac {1}{2}-m} (a \sin (e+f x)+a)^{m-3} \operatorname {Hypergeometric2F1}\left (\frac {5}{2},\frac {1}{2}-m,\frac {7}{2},\frac {1}{2} (1-\sin (e+f x))\right )}{5 f} \]
[In]
[Out]
Rule 71
Rule 72
Rule 2768
Rule 2815
Rubi steps \begin{align*} \text {integral}& = \left (a^2 c^2\right ) \int \cos ^4(e+f x) (a+a \sin (e+f x))^{-2+m} \, dx \\ & = \frac {\left (a^4 c^2 \cos ^5(e+f x)\right ) \text {Subst}\left (\int (a-a x)^{3/2} (a+a x)^{-\frac {1}{2}+m} \, dx,x,\sin (e+f x)\right )}{f (a-a \sin (e+f x))^{5/2} (a+a \sin (e+f x))^{5/2}} \\ & = \frac {\left (2^{-\frac {1}{2}+m} a^4 c^2 \cos ^5(e+f x) (a+a \sin (e+f x))^{-3+m} \left (\frac {a+a \sin (e+f x)}{a}\right )^{\frac {1}{2}-m}\right ) \text {Subst}\left (\int \left (\frac {1}{2}+\frac {x}{2}\right )^{-\frac {1}{2}+m} (a-a x)^{3/2} \, dx,x,\sin (e+f x)\right )}{f (a-a \sin (e+f x))^{5/2}} \\ & = -\frac {2^{\frac {1}{2}+m} a^3 c^2 \cos ^5(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {5}{2},\frac {1}{2}-m,\frac {7}{2},\frac {1}{2} (1-\sin (e+f x))\right ) (1+\sin (e+f x))^{\frac {1}{2}-m} (a+a \sin (e+f x))^{-3+m}}{5 f} \\ \end{align*}
Result contains complex when optimal does not.
Time = 7.16 (sec) , antiderivative size = 250, normalized size of antiderivative = 3.01 \[ \int (3+3 \sin (e+f x))^m (c-c \sin (e+f x))^2 \, dx=\frac {(1+i) 3^m c^2 (1+\sin (e+f x))^m \left (1+\tan \left (\frac {1}{2} (e+f x)\right )\right ) \left ((2-2 i) (5+2 m) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (-3-m+m \sin (e+f x)) \left (-1+\tan \left (\frac {1}{2} (e+f x)\right )\right ) \left (-i+\tan \left (\frac {1}{2} (e+f x)\right )\right )^3+3 \operatorname {Hypergeometric2F1}\left (3+m,5+2 m,2 (3+m),\frac {(1-i) \left (1+\tan \left (\frac {1}{2} (e+f x)\right )\right )}{-i+\tan \left (\frac {1}{2} (e+f x)\right )}\right ) (-i \cos (e+f x)-\sin (e+f x))^m \left (i+\tan \left (\frac {1}{2} (e+f x)\right )\right )^2 \left (1+\tan \left (\frac {1}{2} (e+f x)\right )\right )^4\right )}{f (1+2 m) (3+2 m) (5+2 m) \left (-i+\tan \left (\frac {1}{2} (e+f x)\right )\right )^5 \left (i+\tan \left (\frac {1}{2} (e+f x)\right )\right )^2} \]
[In]
[Out]
\[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c -c \sin \left (f x +e \right )\right )^{2}d x\]
[In]
[Out]
\[ \int (3+3 \sin (e+f x))^m (c-c \sin (e+f x))^2 \, dx=\int { {\left (c \sin \left (f x + e\right ) - c\right )}^{2} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \]
[In]
[Out]
\[ \int (3+3 \sin (e+f x))^m (c-c \sin (e+f x))^2 \, dx=c^{2} \left (\int \left (- 2 \left (a \sin {\left (e + f x \right )} + a\right )^{m} \sin {\left (e + f x \right )}\right )\, dx + \int \left (a \sin {\left (e + f x \right )} + a\right )^{m} \sin ^{2}{\left (e + f x \right )}\, dx + \int \left (a \sin {\left (e + f x \right )} + a\right )^{m}\, dx\right ) \]
[In]
[Out]
\[ \int (3+3 \sin (e+f x))^m (c-c \sin (e+f x))^2 \, dx=\int { {\left (c \sin \left (f x + e\right ) - c\right )}^{2} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \]
[In]
[Out]
\[ \int (3+3 \sin (e+f x))^m (c-c \sin (e+f x))^2 \, dx=\int { {\left (c \sin \left (f x + e\right ) - c\right )}^{2} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int (3+3 \sin (e+f x))^m (c-c \sin (e+f x))^2 \, dx=\int {\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^2 \,d x \]
[In]
[Out]